
import request from '@/utils/request';
import { Result } from './definitions/Result';
import { Dictionary } from './definitions/Dictionary';


export class DictionaryController {

    static insertUsingPOSTPath: string = "/v1/dictionary";
    /// insert
    async insertUsingPOST(data: Dictionary, headers?: any):  Promise<any> {
      return request(`/v1/dictionary`, {
        method: "POST",
        data: JSON.stringify(data) ,
        headers: headers,
      }) as Promise<any>;
    }
    
    static updateUsingPUTPath: string = "/v1/dictionary";
    /// update
    async updateUsingPUT(data: Dictionary, headers?: any):  Promise<any> {
      return request(`/v1/dictionary`, {
        method: "PUT",
        data: JSON.stringify(data) ,
        headers: headers,
      }) as Promise<any>;
    }
    
    static pageUsingPOSTPath: string = "/v1/dictionary/page";
    /// page
    async pageUsingPOST(data: Dictionary, headers?: any):  Promise<any> {
      return request(`/v1/dictionary/page`, {
        method: "POST",
        data: JSON.stringify(data) ,
        headers: headers,
      }) as Promise<any>;
    }
    
    static getUsingGETPath: string = "/v1/dictionary/{id}";

    async getUsingGET(id: string,  headers?: any) : Promise<any> {
      return request(`/v1/dictionary/${id}`, {
        method: "GET",
        headers: headers,
      }) as Promise<any>;
    }
    
    static deleteUsingDELETEPath: string = "/v1/dictionary/{id}";

    async deleteUsingDELETE(id: string,  headers?: any) : Promise<any> {
      return request(`/v1/dictionary/${id}`, {
        method: "DELETE",
        headers: headers,
      }) as Promise<any>;
    }
    
}